#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2022/5/14 9:56
# @Author  : lj
# @File    : dependencies.py
from fastapi import Header, HTTPException


async def get_token_header(x_token):
    if x_token != "fake-super-secret-token":
        raise HTTPException(status_code=400, detail="X-Token header invalid")


async def get_query_token(token: str):
    if token != "jessica":
        raise HTTPException(status_code=400, detail="No Jessica token provided")